import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class Applet extends JApplet implements ActionListener{
	JLabel nameLabel = new JLabel("Name");
	JLabel timeLabel = new JLabel("Time");
	JLabel toLabel1 = new JLabel(" to ");
	JLabel colonLabel1 = new JLabel(":");
	JLabel colonLabel2 = new JLabel(":");
	JLabel timeZoneLabel = new JLabel("Time Zone");
	JLabel dateLabel = new JLabel("Date");
	JLabel slashLabel1 = new JLabel("/");
	JLabel slashLabel2 = new JLabel("/");
	JLabel toLabel2 = new JLabel(" to ");
	JLabel slashLabel3 = new JLabel("/");
	JLabel slashLabel4 = new JLabel("/");
	JLabel locationLabel = new JLabel("Location");
	JLabel descriptionLabel = new JLabel("Description");
	JLabel commentsLabel = new JLabel("Comments");
	JLabel availabilityLabel = new JLabel("Availability");
	JLabel resourcesLabel = new JLabel("Resources");
	
	JTextField nameField = new JTextField("", 20);
	JTextField startHourTimeField = new JTextField("HH", 2);
	JTextField startMinuteTimeField = new JTextField("MM", 2);
	JTextField endHourTimeField = new JTextField("HH", 2);
	JTextField endMinuteTimeField = new JTextField("MM", 2);
	JTextField startDateMonthField = new JTextField("MM", 2);
	JTextField startDateDayField = new JTextField("DD", 2);
	JTextField startDateYearField = new JTextField("YYYY", 3);
	JTextField endDateMonthField = new JTextField("MM", 2);
	JTextField endDateDayField = new JTextField("DD", 2);
	JTextField endDateYearField = new JTextField("YYYY", 3);
	JTextField locationField = new JTextField("", 20);
	JTextArea descriptionArea = new JTextArea("", 8, 15);
	JTextArea commentsArea = new JTextArea("", 8, 15);
	JTextArea resourcesArea = new JTextArea("", 6, 20);
	JScrollPane descriptionPane = new JScrollPane(descriptionArea);
	JScrollPane commentsPane = new JScrollPane(commentsArea);
	JScrollPane resourcesPane = new JScrollPane(resourcesArea);
	
	JButton createButton = new JButton("Create Event");
	JRadioButton AM1Button = new JRadioButton("AM", true);
	JRadioButton PM1Button = new JRadioButton("PM");
	JRadioButton AM2Button = new JRadioButton("AM", true);
	JRadioButton PM2Button = new JRadioButton("PM");
	JRadioButton hawaiiTZButton = new JRadioButton("Hawaii Standard Time", true);
	JRadioButton alaskaTZButton = new JRadioButton("Alaska Daylight Time");
	JRadioButton pacificTZButton = new JRadioButton("Pacific Daylight Time");
	JRadioButton mountainTZButton = new JRadioButton("Mountain Daylight Time");
	JRadioButton centralTZButton = new JRadioButton("Central Daylight Time");
	JRadioButton easternTZButton = new JRadioButton("Eastern Daylight Time");
	JRadioButton busyButton = new JRadioButton("Busy");
	JRadioButton availableButton = new JRadioButton("Available", true);
	
	ButtonGroup time1Group = new ButtonGroup();
	ButtonGroup time2Group = new ButtonGroup();
   ButtonGroup timeZoneGroup = new ButtonGroup();
	ButtonGroup availabilityGroup = new ButtonGroup();
	
	JPanel time1Panel = new JPanel(new GridLayout(2,1));
	JPanel time2Panel = new JPanel(new GridLayout(2,1));
	JPanel timeZonePanel = new JPanel(new GridLayout(3,2));
	JPanel availabilityPanel = new JPanel(new GridLayout(1,2));

	Container contentPane = this.getContentPane();
   SpringLayout layout = new SpringLayout();
	Font f = nameLabel.getFont();
	
	String name;
	int startHourTime;
	int startMinuteTime;
	String startTimeString;
	int endHourTime;
	int endMinuteTime;
	String endTimeString;
	String timeZoneString;
	int startMonth;
	int startDay;
	int startYear;
	int endMonth;
	int endDay;
	int endYear;
	String location;
	String description;
	String comments;
	String availabilityString;
	String resources;
	Color background = new Color(199,237,255);
	
	boolean validEvent = true;
	boolean validStartHourTime = true;
	boolean validStartMinuteTime = true;
	boolean validEndHourTime = true;
	boolean validEndMinuteTime = true;
	boolean validStartDay = true;
	boolean validStartMonth = true;
	boolean validStartYear = true;
	boolean validEndDay = true;
	boolean validEndMonth = true;
	boolean validEndYear = true;
	boolean validName = true;
	boolean allValid = true;


   public void init() {
	   setSize(470, 700);
		contentPane.setBackground(background);
		timeZonePanel.setBackground(background);
		availabilityPanel.setBackground(background);
		time1Panel.setBackground(background);
		time2Panel.setBackground(background);
	   time1Group.add(AM1Button);
		time1Group.add(PM1Button);
		time1Panel.add(AM1Button);
		time1Panel.add(PM1Button);
		time2Group.add(AM2Button);
		time2Group.add(PM2Button);
		time2Panel.add(AM2Button);
		time2Panel.add(PM2Button);
	   timeZoneGroup.add(hawaiiTZButton);
	   timeZoneGroup.add(alaskaTZButton);
	   timeZoneGroup.add(pacificTZButton);
	   timeZoneGroup.add(mountainTZButton);
	   timeZoneGroup.add(centralTZButton);
	   timeZoneGroup.add(easternTZButton);
		timeZonePanel.add(hawaiiTZButton);
	   timeZonePanel.add(alaskaTZButton);
	   timeZonePanel.add(pacificTZButton);
	   timeZonePanel.add(mountainTZButton);
	   timeZonePanel.add(centralTZButton);
	   timeZonePanel.add(easternTZButton);
		availabilityGroup.add(availableButton);
	   availabilityGroup.add(busyButton);
		availabilityPanel.add(availableButton);
	   availabilityPanel.add(busyButton);
   	contentPane.setLayout(layout);
		nameLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
      contentPane.add(nameLabel);
      contentPane.add(nameField);
		timeLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(timeLabel);
		contentPane.add(startHourTimeField);
		contentPane.add(colonLabel1);
		contentPane.add(startMinuteTimeField);
		contentPane.add(time1Panel);
		contentPane.add(toLabel1);
		contentPane.add(endHourTimeField);
		contentPane.add(colonLabel2);
		contentPane.add(endMinuteTimeField);
		contentPane.add(time2Panel);
		timeZoneLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(timeZoneLabel);
		contentPane.add(timeZonePanel);
		dateLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(dateLabel);
		contentPane.add(startDateMonthField);
		contentPane.add(slashLabel1);
		contentPane.add(startDateDayField);
		contentPane.add(slashLabel2);
		contentPane.add(startDateYearField);
		contentPane.add(toLabel2);
		contentPane.add(endDateMonthField);
		contentPane.add(slashLabel3);
		contentPane.add(endDateDayField);
		contentPane.add(slashLabel4);
		contentPane.add(endDateYearField);
		locationLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(locationLabel);
		contentPane.add(locationField);
		descriptionLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(descriptionLabel);
		contentPane.add(descriptionPane);
		commentsLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(commentsLabel);
		contentPane.add(commentsPane);
		availabilityLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(availabilityLabel);
		contentPane.add(availabilityPanel);
		resourcesLabel.setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
		contentPane.add(resourcesLabel);
		contentPane.add(resourcesPane);
		contentPane.add(createButton);
		createButton.addActionListener(this);
		createButton.setActionCommand("create");
		/*AM1Button.addActionListener(this);
		AM1Button.setActionCommand("AM1");
		PM1Button.addActionListener(this);
		PM1Button.setActionCommand("PM1");
		AM2Button.addActionListener(this);
		AM2Button.setActionCommand("AM2");
		PM2Button.addActionListener(this);
		PM2Button.setActionCommand("PM2");
		hawaiiTZButton.addActionListener(this);
		hawaiiTZButton.setActionCommand("Hawaii");
		alaskaTZButton.addActionListener(this);
		alaskaTZButton.setActionCommand("Alaska");
		pacificTZButton.addActionListener(this);
		pacificTZButton.setActionCommand("Pacific");
		mountainTZButton.addActionListener(this);
		mountainTZButton.setActionCommand("Mountain");
		centralTZButton.addActionListener(this);
		centralTZButton.setActionCommand("Central");
		easternTZButton.addActionListener(this);
		easternTZButton.setActionCommand("Eastern");
		busyButton.addActionListener(this);
		busyButton.setActionCommand("busy");
		availableButton.addActionListener(this);
		availableButton.setActionCommand("available");*/
		
		
		
		layout.putConstraint(SpringLayout.WEST, nameLabel, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, nameLabel, 24, SpringLayout.NORTH, contentPane);
		layout.putConstraint(SpringLayout.WEST, nameField, 5, SpringLayout.EAST, nameLabel);
		layout.putConstraint(SpringLayout.NORTH, nameField, 20, SpringLayout.NORTH, contentPane);

		layout.putConstraint(SpringLayout.WEST, timeLabel, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, timeLabel, 24, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, startHourTimeField, 7, SpringLayout.EAST, timeLabel);
		layout.putConstraint(SpringLayout.NORTH, startHourTimeField, 20, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, colonLabel1, 2, SpringLayout.EAST, startHourTimeField);
		layout.putConstraint(SpringLayout.NORTH, colonLabel1, 24, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, startMinuteTimeField, 2, SpringLayout.EAST, colonLabel1);
		layout.putConstraint(SpringLayout.NORTH, startMinuteTimeField, 20, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, time1Panel, 5, SpringLayout.EAST, startMinuteTimeField);
		layout.putConstraint(SpringLayout.NORTH, time1Panel, 16, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, toLabel1, 7, SpringLayout.EAST, time1Panel);
		layout.putConstraint(SpringLayout.NORTH, toLabel1, 24, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, endHourTimeField, 7, SpringLayout.EAST, toLabel1);
		layout.putConstraint(SpringLayout.NORTH, endHourTimeField, 20, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, colonLabel2, 2, SpringLayout.EAST, endHourTimeField);
		layout.putConstraint(SpringLayout.NORTH, colonLabel2, 24, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, endMinuteTimeField, 2, SpringLayout.EAST, colonLabel2);
		layout.putConstraint(SpringLayout.NORTH, endMinuteTimeField, 20, SpringLayout.SOUTH, nameLabel);
		layout.putConstraint(SpringLayout.WEST, time2Panel, 5, SpringLayout.EAST, endMinuteTimeField);
		layout.putConstraint(SpringLayout.NORTH, time2Panel, 16, SpringLayout.SOUTH, nameLabel);
		
		layout.putConstraint(SpringLayout.WEST, timeZoneLabel, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, timeZoneLabel, 55, SpringLayout.SOUTH, timeLabel);
		layout.putConstraint(SpringLayout.WEST, timeZonePanel, 5, SpringLayout.EAST, timeZoneLabel);
		layout.putConstraint(SpringLayout.NORTH, timeZonePanel, 30, SpringLayout.SOUTH, timeLabel);
		
		layout.putConstraint(SpringLayout.WEST, dateLabel, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, dateLabel, 45, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, startDateMonthField, 5, SpringLayout.EAST, dateLabel);
		layout.putConstraint(SpringLayout.NORTH, startDateMonthField, 40, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, slashLabel1, 2, SpringLayout.EAST, startDateMonthField);
		layout.putConstraint(SpringLayout.NORTH, slashLabel1, 45, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, startDateDayField, 2, SpringLayout.EAST, slashLabel1);
		layout.putConstraint(SpringLayout.NORTH, startDateDayField, 40, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, slashLabel2, 2, SpringLayout.EAST, startDateDayField);
		layout.putConstraint(SpringLayout.NORTH, slashLabel2, 45, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, startDateYearField, 2, SpringLayout.EAST, slashLabel2);
		layout.putConstraint(SpringLayout.NORTH, startDateYearField, 40, SpringLayout.SOUTH, timeZoneLabel); 
		layout.putConstraint(SpringLayout.WEST, toLabel2, 5, SpringLayout.EAST, startDateYearField);
		layout.putConstraint(SpringLayout.NORTH, toLabel2, 45, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, endDateMonthField, 5, SpringLayout.EAST, toLabel2);
		layout.putConstraint(SpringLayout.NORTH, endDateMonthField, 40, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, slashLabel3, 2, SpringLayout.EAST, endDateMonthField);
		layout.putConstraint(SpringLayout.NORTH, slashLabel3, 45, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, endDateDayField, 2, SpringLayout.EAST, slashLabel3);
		layout.putConstraint(SpringLayout.NORTH, endDateDayField, 40, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, slashLabel4, 2, SpringLayout.EAST, endDateDayField);
		layout.putConstraint(SpringLayout.NORTH, slashLabel4, 45, SpringLayout.SOUTH, timeZoneLabel);
		layout.putConstraint(SpringLayout.WEST, endDateYearField, 2, SpringLayout.EAST, slashLabel4);
		layout.putConstraint(SpringLayout.NORTH, endDateYearField, 40, SpringLayout.SOUTH, timeZoneLabel); 

      layout.putConstraint(SpringLayout.WEST, locationLabel, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, locationLabel, 24, SpringLayout.SOUTH, dateLabel);
		layout.putConstraint(SpringLayout.WEST, locationField, 5, SpringLayout.EAST, locationLabel);
		layout.putConstraint(SpringLayout.NORTH, locationField, 20, SpringLayout.SOUTH, dateLabel);

		layout.putConstraint(SpringLayout.WEST, descriptionLabel, 70, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, descriptionLabel, 25, SpringLayout.SOUTH, locationLabel);
		layout.putConstraint(SpringLayout.WEST, descriptionPane, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, descriptionPane, 45, SpringLayout.SOUTH, locationLabel);
		
		layout.putConstraint(SpringLayout.WEST, commentsLabel, 75, SpringLayout.EAST, descriptionPane);
		layout.putConstraint(SpringLayout.NORTH, commentsLabel, 25, SpringLayout.SOUTH, locationLabel);
		layout.putConstraint(SpringLayout.WEST, commentsPane, 25, SpringLayout.EAST, descriptionPane);
		layout.putConstraint(SpringLayout.NORTH, commentsPane, 45, SpringLayout.SOUTH, locationLabel);
		
		layout.putConstraint(SpringLayout.WEST, availabilityLabel, 70, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, availabilityLabel, 24, SpringLayout.SOUTH, commentsPane);
		layout.putConstraint(SpringLayout.WEST, availabilityPanel, 5, SpringLayout.EAST, availabilityLabel);
		layout.putConstraint(SpringLayout.NORTH, availabilityPanel, 20, SpringLayout.SOUTH, commentsPane);
		
		layout.putConstraint(SpringLayout.WEST, resourcesLabel, 20, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, resourcesLabel, 20, SpringLayout.SOUTH, availabilityLabel);
		layout.putConstraint(SpringLayout.WEST, resourcesPane, 5, SpringLayout.EAST, resourcesLabel);
		layout.putConstraint(SpringLayout.NORTH, resourcesPane, 20, SpringLayout.SOUTH, availabilityLabel);

		layout.putConstraint(SpringLayout.WEST, createButton, 150, SpringLayout.WEST, contentPane);
		layout.putConstraint(SpringLayout.NORTH, createButton, 20, SpringLayout.SOUTH, resourcesPane);
	}
	
	public void actionPerformed(ActionEvent e)
	{
		if (e.getActionCommand().equals("create"))
		{
			this.name = nameField.getText();
			this.startHourTime = Integer.parseInt(startHourTimeField.getText());
			this.startMinuteTime = Integer.parseInt(startMinuteTimeField.getText());
			this.endHourTime = Integer.parseInt(endHourTimeField.getText());
			this.endMinuteTime = Integer.parseInt(endMinuteTimeField.getText());
			this.startMonth = Integer.parseInt(startDateMonthField.getText());
			this.startDay = Integer.parseInt(startDateDayField.getText());
			this.startYear = Integer.parseInt(startDateYearField.getText());
			this.endMonth = Integer.parseInt(endDateMonthField.getText());
			this.endDay = Integer.parseInt(endDateDayField.getText());
			this.endYear = Integer.parseInt(endDateYearField.getText());
			this.location = locationField.getText();
			this.description = descriptionArea.getText();
			this.comments = commentsArea.getText();
			this.resources = resourcesArea.getText();
			
			if (AM1Button.isSelected())
			{
			    startTimeString = "AM";
			}
			
			else if (PM1Button.isSelected())
			{
			     startTimeString = "PM";
			}
			
			if (AM2Button.isSelected())
			{
			    endTimeString = "AM";
			}
			
			else if (PM2Button.isSelected())
			{
			     endTimeString = "PM";
			}
			
			if (hawaiiTZButton.isSelected())
			{
			     timeZoneString = "Hawaii Standard Time";
			}
			
			else if (alaskaTZButton.isSelected())
			{
			     timeZoneString = "Alaska Daylight Time";
			}
			
			else if (pacificTZButton.isSelected())
			{
			     timeZoneString = "Pacific Daylight Time";
			}
			
			else if (mountainTZButton.isSelected())
			{
			     timeZoneString = "Mountain Daylight Time";
			}
			
			else if (centralTZButton.isSelected())
			{
			     timeZoneString = "Central Daylight Time";
			}
			
			else if (easternTZButton.isSelected())
			{
			     timeZoneString = "Eastern Daylight Time";
			}
			
			if (availableButton.isSelected())
			{
			    availabilityString = "available";
			}
			
			else if (busyButton.isSelected())
			{
				 availabilityString = "busy";
			}
		
			this.validateName();
			if (!this.validName)
			{
				descriptionArea.append("The name you entered was not valid.\n");
			}
		
			this.validateStartHour();
			this.validateStartMinute();
			this.validateEndHour();
			this.validateEndMinute();
			if (!this.validStartHourTime)
			{
				this.allValid = false;
				descriptionArea.append("The hour of the start time is not valid.\n");
			}
			if (!this.validStartMinuteTime)
			{
				this.allValid = false;
				descriptionArea.append("The minute of the start time is not valid.\n");
			}
			if (!this.validEndHourTime)
			{
				this.allValid = false;
				descriptionArea.append("The hour of the end time is not valid.\n");
			}
			if (!this.validEndMinuteTime)
			{
				this.allValid = false;
				descriptionArea.append("The minute of the end time is not valid.\n");
			}
		
			this.validateStartYear();
			this.validateStartMonth();
			
			if (this.validStartYear)
			{
				if (this.validStartMonth)
				{
					this.validateStartDay();
					
					if (!this.validStartDay)
					{
						this.allValid = false;
						descriptionArea.append("The day you entered was not valid.\n");
					}
				}
				
				else
				{
					this.allValid = false;
					descriptionArea.append("The month you entered was not valid.\n");
				}
			}
		
			else
			{
				this.allValid = false;
				descriptionArea.append("The year you entered was not valid.\n");
				
				if (!this.validStartDay)
				{
					descriptionArea.append("The month you entered was not valid.\n");
				}
			}
			
			this.validateEndYear();
			this.validateEndMonth();
			
			if (this.validEndYear)
			{
				if (this.validEndMonth)
				{
					this.validateEndDay();
					
					if (!this.validEndDay)
					{
						this.allValid = false;
						descriptionArea.append("The ending daye you entered was not valid.\n");
					}
				}
				
				else
				{
					this.allValid = false;
					descriptionArea.append("The ending month you entered was not valid.\n");
				}
			}
		
			else
			{
				this.allValid = false;
				descriptionArea.append("The ending year you entered was not valid.\n");
				
				if (!this.validEndDay)
				{
					descriptionArea.append("The month you entered was not valid.\n");
				}
			}
			
			
			this.setSize(700,900);
			JTextArea resultArea = new JTextArea("", 50,100);
			JScrollPane resultPane = new JScrollPane(resultArea);
			this.add(resultPane);
			layout.putConstraint(SpringLayout.WEST, resultPane, 50, SpringLayout.EAST, timeZonePanel);
			resultArea.append("Name: " + name);
			resultArea.append("\nStart time: " + startHourTime + ":" + startMinuteTime + " " + startTimeString);
			resultArea.append("\nEnd time: " + endHourTime + ":" + endMinuteTime + " " +endTimeString);
			resultArea.append("\nTime zone: " + timeZoneString);
			resultArea.append("\nStart date: " + startMonth + "/" + startDay + "/" + startYear);
			resultArea.append("\nEnd date: " + endMonth + "/" + endDay + "/" + endYear);
			resultArea.append("\nLocation: " + location);
			resultArea.append("\nDescription: " + description);
			resultArea.append("\nComments: " + comments);
			resultArea.append("\nAvailability: " + availabilityString);
			resultArea.append("\nResources: " + resources);
		}
			
	}
	
	public int getStartHourTime()
	{
	    return this.startHourTime;
	}
	
	public int getStartMinuteTime()
	{
		return this.startMinuteTime;
	}
	
	public int getEndHourTime()
	{
	    return this.endHourTime;
	}
	
	public int getEndMinuteTime()
	{
		return this.endMinuteTime;
	}
	
	public String getName()
	{
	    return this.name;
	}
	
	public int getStartMonth()
	{
		return this.startMonth;
	}
	
	public int getStartDay()
	{
		return this.startDay;
	}
	
	public int getStartYear()
	{
		return this.startYear;
	}
	
	public int getEndMonth()
	{
		return this.endMonth;
	}
	
	public int getEndDay()
	{
		return this.endDay;
	}
	
	public int getEndYear()
	{
		return this.endYear;
	}

	public String getDescription()
	{
		return this.description;
	}
	
	public String getStartTimeString()
	{
		return this.startTimeString;
	}
	
	public String getEndTimeString()
	{
		return this.endTimeString;
	}
	
	public String getTimeZoneString()
	{
		return this.timeZoneString;
	}
	
	public String getLocationString()
	{
		return this.location;
	}
	
	public String getComments()
	{
		return this.comments;
	}
	
	public String getAvailabilityString()
	{
		return this.availabilityString;
	}
	
	public String getResources()
	{
		return this.resources;
	}

	public void validateStartMonth()
	{
		if (this.startMonth >= 1 && this.startMonth <= 12)
		{
			this.validStartMonth = true;
		}
		
		else
		{
			this.validStartMonth = false;
		}
	}
	
	public void validateStartDay()
	{
		boolean isLeapYear = false;
	
		if (this.startMonth == 1 || this.startMonth == 3 || this.startMonth == 5 || this.startMonth == 7 || this.startMonth == 8 || this.startMonth == 10 || this.startMonth == 12)
		{
			if (this.startDay >= 1 && this.startDay <= 31)
			{
				this.validStartDay = true;
			}
		}
		
		else if (this.startMonth == 4 || this.startMonth == 6 || this.startMonth == 9 || this.startMonth == 11)
		{
			if (this.startDay >= 1 && this.startDay <= 30)
			{
				this.validStartDay = true;
			}
		}
		
		else if (this.startMonth == 2)
		{
			if (this.startYear % 400 == 0)
			{
				isLeapYear = true;
			}
			
			else if (this.startYear % 100 == 0)
			{
				isLeapYear = false;
			}
			
			else if (this.startYear % 4 == 0)
			{
				isLeapYear = true;
			}
			
			if (isLeapYear)
			{
				if (this.startDay >= 1 && this.startDay <= 29)
				{
					this.validStartDay = true;
				}
			}
			
			else if (!isLeapYear)
			{
				if (this.startDay >= 1 && this.startDay <= 28)
				{
					this.validStartDay = true;
				}
			}
		}
			
		else
		{
			this.validStartDay = false;
		}
	}
	
	public void validateStartYear()
	{
		if (this.startYear > 0)
		{
			this.validStartYear = true;
		}
	
		else
		{
			this.validStartYear = false;
		}
	}
	
	public void validateEndMonth()
	{
		if (this.endMonth >= 1 && this.endMonth <= 12)
		{
			this.validEndMonth = true;
		}
		
		else
		{
			this.validEndMonth = false;
		}
	}
	
	public void validateEndDay()
	{
		boolean isLeapYear = false;
	
		if (this.endMonth == 1 || this.endMonth == 3 || this.endMonth == 5 || this.endMonth == 7 || this.endMonth == 8 || this.endMonth == 10 || this.endMonth == 12)
		{
			if (this.endDay >= 1 && this.endDay <= 31)
			{
				this.validEndDay = true;
			}
		}
		
		else if (this.endMonth == 4 || this.endMonth == 6 || this.endMonth == 9 || this.endMonth == 11)
		{
			if (this.endDay >= 1 && this.endDay <= 30)
			{
				this.validEndDay = true;
			}
		}
		
		else if (this.endMonth == 2)
		{
			if (this.endYear % 400 == 0)
			{
				isLeapYear = true;
			}
			
			else if (this.endYear % 100 == 0)
			{
				isLeapYear = false;
			}
			
			else if (this.endYear % 4 == 0)
			{
				isLeapYear = true;
			}
			
			if (isLeapYear)
			{
				if (this.endDay >= 1 && this.endDay <= 29)
				{
					this.validEndDay = true;
				}
			}
			
			else if (!isLeapYear)
			{
				if (this.endDay >= 1 && this.endDay <= 28)
				{
					this.validEndDay = true;
				}
			}
		}
			
		else
		{
			this.validEndDay = false;
		}
	}
	
	public void validateEndYear()
	{
		if (this.endYear > 0)
		{
			this.validEndYear = true;
		}
	
		else
		{
			this.validEndYear = false;
		}
	}
	
	public void validateStartHour()
	{
		if (this.startHourTime >= 1 && this.startHourTime <= 24)
		{
			this.validStartHourTime = true;
		}
		
		else
		{
			this.validStartHourTime = false;
		}
	}
	
	public void validateStartMinute()
	{
		if (this.startMinuteTime >= 0 && this.startMinuteTime <= 59)
		{
			this.validStartMinuteTime = true;
		}
		
		else
		{
			this.validStartMinuteTime = false;
		}
	}
	
	public void validateEndHour()
	{
		if (this.endHourTime >= 1 && this.endHourTime <= 24)
		{
			this.validEndHourTime = true;
		}
		
		else
		{
			this.validEndHourTime = false;
		}
	}
	
	public void validateEndMinute()
	{
		if (this.endMinuteTime >= 0 && this.endMinuteTime <= 59)
		{
			this.validEndMinuteTime = true;
		}
		
		else
		{
			this.validEndMinuteTime = false;
		}
	}
	
	public void validateName()
	{
		if (this.name.length() > 0)
		{
			validName = true;
		}
		
		else
		{
			validName = false;
		}
	}

}